<template>
	<view>
		<view class="top">
			人脸支付 | 安全 | 省心
		</view>
		
		<view class="form">
			<input type="text" v-model="username" placeholder="请输入您的用户名" />
			<input type="password" v-model="password" placeholder="请输入您的密码" />
		</view>
		
		<button @click="login" type="default">登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				username:'',
				password:''
			}
		},
		onLoad() {
		},
		methods: {
			login(){
				this.$http('/authority/api/login/bindWxId',{
					"UserName":this.username,
					 "Password":this.password,
					 "openId":uni.getStorageSync('openId')
				},res=>{
					
					uni.setStorageSync('token',res.data.token)
					uni.reLaunch({
						url:'/pages/teacher/teacher?isBind=1'
					})
				})
			}
		}
	}
</script>

<style scoped lang="less">
.top{
	background-image: url(../../static/bg.png);
	width: 100%;
	height: 378upx;
	background-size: 100% 100%;
	color: rgb(51,153,0);
	font-size: 50upx;
	text-align: center;
	line-height: 400upx;
}
.form{
	width: 90%;
	margin: 30upx auto;
	background-color: #FFFFFF;
	padding: 40upx 0;
	border-radius: 10upx;
	>input{
		border: 1upx solid #cccccc;
		height: 70upx;
		width: 80%;
		margin: 60upx auto;
		font-size: 28upx;
		padding-left: 20upx;
	}
}
button{
	width: 90%;
	height: 80upx;
	background-color: rgb(7,193,96);
	border: none;
	color: #FFFFFF;
	font-size: 28upx;
	line-height: 80upx;
	margin-top: 60upx;
}
</style>
